<?php
/**
 * True Gallery back-end menu navigation template file
 *
 * @version 2.5
 * @author Alexey N. Brin (userxp@joomlaportal.ru)
 * @homepage http://truegallery.ru 
 * @filename menunav.tpl.php
 * @package True Gallery
 * @copyright (C) 2008-2009 by joomlatune.ru
 * @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
 * 
 * THIS GALLERY is an EVOLUTION of AkoGallery -> PonyGallery -> DatsoGallery
 *
 * If you fork this to create your own project, 
 * please make a reference to True Gallery someplace in your code 
 * and provide a link to http://www.joomlatune.ru
 *
 **/

defined ( '_VALID_MOS' ) or defined ( '_JEXEC' ) or die ( 'Direct Access to this location is not allowed.' );
/*
$texts = array( 
	array( JText::_('TG_INSTALL_PIC'),	JText::_('TG_INSTALL_PIC_I'),	'&view=pictures',				'pictures',		'pictures-16x16.png', 'thememanager' ),
	//array( JText::_('TG_INSTALL_PIC'),	JText::_('TG_PICS_MANAGER_TITLE'),	'&view=pictures',				'pictures',		'pictures-16x16.png', 'thememanager' ),
	array( JText::_('TG_INSTALL_CAT'),	JText::_('TG_INSTALL_CAT_I'),	'&view=categories',				'categories',	'folder-pictures-16x16.png', 'categories' ),
	//array( JText::_('TG_INSTALL_U'),	JText::_('TG_INSTALL_U_I'),		'&view=upload',					'',				'tgupload.png', '' ),
	//array( JText::_('TG_INSTALL_BU'),	JText::_('TG_INSTALL_BU_I'),	'&view=upload&task=showbatch',	'upload',		'zip-file-16x16.png', '' ),
	//array( JText::_('TG_INSTALL_BI'),	JText::_('TG_INSTALL_BI_I'),	'&view=upload&task=showimport',	'import',		'floppy-16x16.png', '' ),
	array( JText::_('TG_INSTALL_CONF'),	JText::_('TG_INSTALL_CONF_I'),	'&view=settings',				'config',		'settings-16x16.png', 'config' ),
	array( JText::_('TG_INSTALL_RV'),	JText::_('TG_INSTALL_RV_I'),	'&view=votes',					'votes',		'recyclebin-full-16x16.png', 'systeminfo' ),
	array( JText::_('TG_INSTALL_RT'),	JText::_('TG_INSTALL_RT_I'),	'&view=rebuild',				'rebuild',		'programs-mac-16x16.png', 'checkin ' )
);
*/

//			text				note				view|task|action	css class
$texts = array( 
	array( 'TG_INSTALL_PIC',		'TG_INSTALL_PIC_I',		'pictures',		'thememanager'	),
	array( 'TG_INSTALL_CAT',		'TG_INSTALL_CAT_I',		'categories',	'categories'	),
	array( 'TG_INSTALL_CONF',	'TG_INSTALL_CONF_I',	'settings',		'config'		),
	array( 'TG_INSTALL_RV',		'TG_INSTALL_RV_I',		'votes',		'systeminfo'	),
	array( 'TG_INSTALL_RT',		'TG_INSTALL_RT_I',		'rebuild',		'checkin'		)/*,
	array( 'TG_PICID_SEARCH',	'TG_PICID_SEARCH_I',	'pictures',		'search'		)*/
);



$uview	= getUrlParam( 'view', '' );
//$utask	= getUrlParam( 'task', '' );
//$uaction	= getUrlParam( 'action', '' );

$request = $_SERVER['QUERY_STRING'];

$adminNav = '';
if( JOOMLA_JVERSION=='1.0' ) $adminNav .= '<div class="m">';
$adminNav .= '<ul id="submenu">';
$prefix = 'index.php?option='.TG_CMP;
$class = ' class="hasMenuTip"';

foreach( $texts as $t ) {
	
	/*if( $prefix.$t[2] == $request ) {
		$class = ' class="hasMenuTip active"';
	}*/
	
	$vta = explode( '|', $t[2] );
	if( !is_array( $vta ) ) $vata = array( $t[2] );
	if( $uview == @$vta[0]) {
		JToolBarHelper::title( JText::_($t[1]), $t[3] );
	}
	$link = $prefix . ( isset($vta[0]) ? '&view='.$vta[0] : '' );
	$link .= isset($vta[1]) ? '&task='.$vta[1] : '';
	$link .= isset($vta[2]) ? '&action='.$vta[2] : '';
	$a = JText::_($t[0]);
	//$adminNav .= '<li class="tg_menu '.$t[3].'"><a title="'.$t[0].'::'.$t[1].'" href="index.php?'.$prefix.$t[2].'"'.$class.'>'.$t[0].'</a></li>';
	$adminNav .= '<li class="tg_menu '.$t[3].'"><a title="'.$a.'::'.JText::_($t[1]).'" href="'.$link.'">'.$a.'</a></li>';
}

$adminNav .= '
	<li class="tg_menu">
		<form name="picidformsearch" action="index.php" method="get">
			<label for="picid">&nbsp;&nbsp;Filter by ID&nbsp;</label>
			
			<input type="hidden" name="option" value="com_true" />
			<input type="hidden" name="view" value="pictures" />
			<input type="hidden" name="task" value="show" />
		
			<input type="text" name="picid" value="'.getUrlParam('picid').'" />
		</form>
	</li>';

$adminNav .= '<li><div class="loading"></div></li></ul>';
if( JOOMLA_JVERSION=='1.0' ) $adminNav .= '</div>';
echo getRoundedTab( $adminNav, 'submenu-box' );

/*
?>
<script>
function revertToAjax() {
	$j("#submenu li.tg_menu a").click( function(e) {
		var ev = jQuery.Event(e);
		ev.preventDefault();
		var a = $j(this); 
		var url = a.attr('href')+'&no_html=1&ax=1';
		var contr = $j("#tgadmincontainer");
		contr.fadeOut();
		contr.load(
			url,'',function(esponseText, textStatus, XMLHttpRequest){
				contr.fadeIn();
			}
		);
	});
}

//jQuery(document).ready(function(){
	// revertToAjax();
//}
</script>
<?php */ 
?>